<script type="text/javascript" src="{HEJIN_PATH}public/admin/js/jquery.js"></script>
<script type="text/javascript" src="{HEJIN_PATH}public/admin/js/jquery.validation.min.js"></script>
<script type="text/javascript" src="{HEJIN_PATH}public/admin/js/admincp.js"></script>
<script type="text/javascript" src="{HEJIN_PATH}public/admin/js/jquery.tooltip.js"></script>
<script type="text/javascript" src="{HEJIN_PATH}public/admin/js/jquery.cookie.js"></script>
<link href="{HEJIN_PATH}public/admin/css/skin_0.css" rel="stylesheet" type="text/css" id="cssfile2" />
<link href="{HEJIN_PATH}public/admin/css/style.css" rel="stylesheet" type="text/css"/>


<div class="page">
  <div class="fixed-bar">
    <div class="item-title">
<div class="h3" style="width:auto">{lang hejin_box:addtextreply}</div>
      <ul class="tab-base">
        <li><a href="admin.php?action=plugins&operation=config&do={$_GET['do']}&identifier=hejin_box&pmod=replytext&model=text" class="current"><span>{lang hejin_box:textreply}</span></a></li>
      </ul>
    </div>
  </div>
  <form id="add_form" method="post" enctype="multipart/form-data" action="">
    <input type="hidden" name="formhash" value="{FORMHASH}" />
    <input type="hidden" name="type" value="2" />
    <table class="table tb-type2">
      <tbody>
        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="test_keywords">{lang hejin_box:keyword}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><input type="text" value="" name="keywords" id="class_name" class="txt"></td>
          <td class="vatop tips">{lang hejin_box:keywordts}</td>
        </tr>


        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="test_content">{lang hejin_box:content}</label></td>
        </tr>
        <tr class="noborder">
          <td class="vatop rowform"><textarea name="content" rows="18" class="tarea" id="statistics_code" style="height: 247px;"></textarea>
         </td>
          <td class="vatop tips">{lang hejin_box:textcontenttsa}<br />{lang hejin_box:textcontenttsb}<xmp><a href="http://www.baidu.com">baidu</a></xmp><br />{lang hejin_box:textcontenttsc}<xmp><a href="tel://13988888888">13988888888</a></xmp><br />{lang hejin_box:textcontenttsd}<xmp><a href="http://wpa.qq.com/msgrd?v=3&uin=237894661&site=qq&menu=yes">237894661</a></xmp></td>
        </tr>



        <tr class="noborder">
          <td colspan="2" class="required"><label class="validation" for="test_state">{lang hejin_box:state}</label></td>
        </tr>

<tr style="background: none repeat scroll 0% 0% rgb(255, 255, 255);" class="noborder">
          <td class="vatop rowform onoff"><label for="state1" class="cb-enable selected"><span>{lang hejin_box:qiyong}</span></label>
            <label for="state0" class="cb-disable "><span>{lang hejin_box:jinyong}</span></label>
            <input id="state1" name="state" checked="checked" value="1" type="radio">
            <input id="state0" name="state" value="0" type="radio"></td>
          <td class="vatop tips"></td>
        </tr>

 
 
 
      </tbody>
      <tfoot>
        <tr>
          <td colspan="2"><input name="add_reply" class="btn" type="submit" value="{lang hejin_box:baocun}" /></td>
        </tr>
      </tfoot>
    </table>
  </form>
</div>
<script type="text/javascript">
$(document).ready(function(){




    $("#submit").click(function(){
        $("#add_form").submit();
    });

    $("input[nc_type='microshop_goods_class_image']").live("change", function(){
		var src = getFullPath($(this)[0]);
		$(this).parent().prev().find('.low_source').attr('src',src);
		$(this).parent().find('input[class="type-file-text"]').val($(this).val());
	});


    $('#add_form').validate({
        errorPlacement: function(error, element){
            error.appendTo(element.parent().parent().prev().find('td:first'));
        },
        success: function(label){
            label.addClass('valid');
        },
        rules : {
            keywords: {
                required : true,
                maxlength : 255
            },
            content: {
                required : true,
            },
            state: {
                required : true,
                digits: true,
			 },
        },
        messages : {
            keywords: {
                required : "{lang hejin_box:addmsga}",
                maxlength : jQuery.validator.format("{lang hejin_box:addmsgb}255{lang hejin_box:addmsgc}")
            },
            content: {
                required : "{lang hejin_box:addmsga}",
            },
            state: {
                required : "{lang hejin_box:addmsga}",
				digits: "{lang hejin_box:addmsgd}",
				},
        }
    });
});
</script> 
